<!DOCTYPE HTML>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
    <div class="container-div">
		<div class="btn-group hidden-xs" id="toolbar" role="group">
			<a class="btn btn-outline btn-success btn-rounded" onclick="$.operate.add()" shiro:hasPermission="module:jobDetail:add">
				<i class="fa fa-plus"></i> 新增
			</a>
			<a class="btn btn-outline btn-danger btn-rounded" onclick="$.operate.removeAll()" shiro:hasPermission="module:jobDetail:remove">
				<i class="fa fa-trash-o"></i> 删除
			</a>
		</div>
			
		<div class="col-sm-12 select-table table-striped">
			<table id="bootstrap-table" data-mobile-responsive="true"></table>
		</div>
    </div>
    <div th:include="include :: footer"></div>
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('module:jobDetail:edit')}]];
        var removeFlag = [[${@permission.hasPermi('module:jobDetail:remove')}]];
        var prefix = ctx + "module/jobDetail"

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
				height: $(window).height()/1.5,
                removeUrl: prefix + "/remove",
                modalName: "作业详情",
                columns: [{
		            checkbox: true
		        },
				{
					field : 'jobDetailId', 
					title : '作业子表id' 
				},
				{
					field : 'jobId', 
					title : '作业id' 
				},
				{
					field : 'stockId', 
					title : '库存ID' 
				},
				{
					field : 'productDetailId', 
					title : '流水号 ID（物品明细id）' 
				},
				{
					field : 'lotNo', 
					title : '批号' 
				},
				{
					field : 'cargoNo', 
					title : '货物编号' 
				},
				{
					field : 'inDate', 
					title : '日期' 
				},
				{
					field : 'inOrOutId', 
					title : '出入库表单id' 
				},
				{
					field : 'inOrOutDId', 
					title : '出入库明细id' 
				},
				{
					field : 'productGuid', 
					title : '物品guid' 
				},
				{
					field : 'productId', 
					title : '物资id' 
				},
				{
					field : 'stockStatus', 
					title : '库存状态（不允许为空）' 
				},
				{
					field : 'productStatus', 
					title : '物品状态（不允许为空）' 
				},
				{
					field : 'inLayerQuantity', 
					title : '入库层数' 
				},
				{
					field : 'quantity', 
					title : '入库数量' 
				},
				{
					field : 'giveNum', 
					title : '回流数量' 
				},
				{
					field : 'inQuantityX', 
					title : '' 
				},
				{
					field : 'inQuantityJ', 
					title : '' 
				},
				{
					field : 'stockQuantityX', 
					title : '' 
				},
				{
					field : 'stockQuantityJ', 
					title : '' 
				},
				{
					field : 'outQuantityX', 
					title : '' 
				},
				{
					field : 'outQuantityJ', 
					title : '' 
				},
				{
					field : 'layerQuantity', 
					title : '库存层数' 
				},
				{
					field : 'outLayerQuantity', 
					title : '出库层数' 
				},
				{
					field : 'outLayer', 
					title : '出库层' 
				},
				{
					field : 'giveNumX', 
					title : '' 
				},
				{
					field : 'giveNumJ', 
					title : '' 
				},
				{
					field : 'barCetr', 
					title : '' 
				},
				{
					field : 'barCetrName', 
					title : '' 
				},
				{
					field : 'stockinId', 
					title : '入库单主表id' 
				},
				{
					field : 'stackingId', 
					title : '' 
				},
				{
					field : 'boxHeight', 
					title : '' 
				},
				{
					field : 'exitId', 
					title : '出口id' 
				},
		        {
		            title: '操作',
		            align: 'center',
		            formatter: function(value, row, index) {
		            	var actions = [];
		            	actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.jobDetailId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.jobDetailId + '\')"><i class="fa fa-remove"></i>删除</a>');
						return actions.join('');
		            }
		        }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>